package com.test.test.Service.impl;

import com.test.test.Service.GoodService;

import com.test.test.dao.GoodsDao;
import com.test.test.pojo.Goods;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class GoodServiceImpl implements GoodService {
    @Autowired
    private GoodsDao goodsDao;
    @Override
    public List<Goods> find() {
        List<Goods> list=goodsDao.find();
        return list;
    }

    @Override
    public int  deleteBYId(Integer id) {
        int rows=goodsDao.deleteById(id);
        return rows;
    }

    @Override
    public int  insertObject(Goods goods) {

        int rows=goodsDao.insertObject(goods);
        return rows;
    }
}
